<%
DIRECTIVE SAFE_OUTPUT_OPEN;
var headContent = {
include("/pages/template/head.html"){}
%>
<script type="text/javascript">
    var oper = {
        save:function(id){
            if(!validForm()) {
                return false;
            }
            var url = 'system/agentProsDiscount/save/'+id;
            form1.action = url;
            form1.submit();
            return true;
        }
    };

</script>

<%
};
var bodyContent = {
%>
<form name="form1" action="" method="post" class="form-horizontal"
	  role="form" >
	<input type="hidden" name="model.ids" value="${model.ids}" />

	<table class="table">
		<% // 列表头部 %>
		<tr>
			<td>客户名称</td>
			<td>
			   	<select name="model.customerId" class="form-control" valid="vselect" validname="请选择客户">
				<option value="-1">请选择客户</option>
				${selectCustomer }
				</select>
			</td>
		</tr>
		
			<tr>
			<td>平台产品名称</td>
			<td>
				<input class="form-control" type="text" name="model.proId" readonly="readonly"
					   value="${model.proId}" valid="vtext" validname="平台产品名称" />
			</td>
		</tr>
		</tr>
			<tr>
			<td>折扣开始日期</td>
			<td>
				<input class="form-control" type="text" name="model.begin_time"
					   value="${model.begin_time}" valid="vtext" validname="折扣开始日期" />
			</td>
		</tr>
		</tr>
			<tr>
			<td>折扣结束日期</td>
			<td>
				<input class="form-control" type="text" name="model.end_time"
					   value="${model.end_time}" valid="vtext" validname="折扣结束日期" />
			</td>
		</tr>
		</tr>
			<tr>
			<td>折扣</td>
			<td>
				<input class="form-control" type="text" name="model.discount"
					   value="${model.discount}" valid="vtext" validname="折扣" />
			</td>
		</tr>
	
	</table>

	<div style="height: 50px;clear: both;">&nbsp;</div>
	<nav class="navbar navbar-default navbar-fixed-bottom">
		<div class="container" style="padding: 5px 0px 5px 0px;text-align: center;">
		
			<button class="btn btn-primary" onclick="oper.save('${model.ids}');return false;">保 存</button>
			
			<button class="btn btn-default" onclick="closeIframe();return false;">关 闭</button>
		</div>
	</nav>
</form>
<%}; %>

<% layout("/pages/template/_layout.html",{head:headContent,body:bodyContent}){ %>
DIRECTIVE SAFE_OUTPUT_CLOSE;
<%} %>